/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.etop.weibo.beans;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;

/**
 * <p>userId----u_id</p>
 * @author jansing
 * 
 */
@Entity
@Table(name = "t_say")
public class Say {

    private int id;
    private int userId;
    private String what;
    private int praise;
    private Date createTime;

    public Say() {
        this.createTime = new java.util.Date();
    }

    public Say(int userId, String what, int praise) {
        this();
        this.userId = userId;
        this.what = what;
        this.praise = praise;
    }

    public Say(int userId, String what, int praise, Date createTime) {
        this.userId = userId;
        this.what = what;
        this.praise = praise;
        this.createTime = createTime;
    }

    public Say(int id, int userId, String what, int praise, Date createTime) {
        this.id = id;
        this.userId = userId;
        this.what = what;
        this.praise = praise;
        this.createTime = createTime;
    }

    @Id
    @GeneratedValue
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Column(name = "u_id")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int whoId) {
        this.userId = whoId;
    }

    @Column(name = "what")
    public String getWhat() {
        return what;
    }

    public void setWhat(String what) {
        this.what = what;
    }

    @Column(name = "praise")
    public int getPraise() {
        return praise;
    }

    public void setPraise(int praise) {
        this.praise = praise;
    }

    @Column(name = "create_time")
    @Temporal(value=javax.persistence.TemporalType.TIMESTAMP)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

}
